package chapter_7;

import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.PrintStream;
import java.io.PrintWriter;

public class Test19 {
    public static void main(String[] args) throws Exception{
        PrintWriter pw = new PrintWriter(new FileWriter("D:\\str.txt"),true);
        pw.println("你好 世界");
        pw.print(" hello world");
        pw.close();

        PrintStream ps = new PrintStream(new FileOutputStream("D:\\str.txt"),true);
        ps.println("php是世界上最好的语言");
        ps.println("解决");
        ps.close();
    }
}
